Table of Contents
KindleEar is a github repo for generating and pushing subscription stuff to your kindle.
1 Installation
1.1 prepare
python2.7.x
1.2 Google accounts
1.3 GAE SDK1
1 | wget -q https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-225.0.0-darwin-x86_64.tar.gz |
1 | ➜ google-cloud-sdk ./install.sh |
1 | ➜ google-cloud-sdk ./bin/gcloud init |
1.4 KindleEar download and configuration
1 | wget -qO KindleEar.zip https://github.com/cdhigh/KindleEar/archive/master.zip |
Modify 3 files under KindleEar with your google application id, gmail, domain name.
File | Item | Note |
---|---|---|
app.yaml | application | Project ID |
module_worker.yaml | application | Project ID |
config.py | DOMAIN | http://project_id.appspot.com |
config.py | SRC_EMAIL | gmail |
1.5 Deploying KindleEar to GAE
1 | ### Go to your google-cloud-sdk |
WARNING: In file [/Users/xxxx/Downloads/KindleEar-master/module-worker.yaml]: ('module', 'Field module is deprecated; use service instead.') Initializing App Engine resources...done. Services to deploy: descriptor: [/Users/xxxx/Downloads/KindleEar-master/app.yaml] source: [/Users/xxxx/Downloads/KindleEar-master] target project: [YOUR_project_ID] target service: [default] target version: [20181121t131444] target url: [https://YOUR_project_ID.appspot.com] descriptor: [/Users/xxxx/Downloads/KindleEar-master/module-worker.yaml] source: [/Users/xxxx/Downloads/KindleEar-master] target project: [YOUR_project_ID] target service: [worker] target version: [20181121t131444] target url: [https://worker-dot-YOUR_PROJECT_ID.appspot.com] Do you want to continue (Y/n)? Beginning deployment of service [default]... ╔════════════════════════════════════════════════════════════╗ ╠═ Uploading 489 files to Google Cloud Storage ═╣ ╚════════════════════════════════════════════════════════════╝ File upload done. Updating service [default]...done. Setting traffic split for service [default]...done. Deployed service [default] to [https://YOUR_project_ID.appspot.com] Beginning deployment of service [worker]... ╔════════════════════════════════════════════════════════════╗ ╠═ Uploading 0 files to Google Cloud Storage ═╣ ╚════════════════════════════════════════════════════════════╝ File upload done.
1.6 Install the kindleear on Google Cloud shell.
Start cloud shell guide
Select or Create a App here , then Click the Activate Cloud Shell
button, and Start shell
button.
Run these command in shell if you work on an old project
1 | gcloud config set project your_project_id |
Run these commands in shell if you create a new project
1 | gcloud beta app create |
Wait kindleear to finish installation
Google project id and gmail should be entered during installation.
https://console.cloud.google.com/appengine/settings?project=YOUR_PROJECT_ID goto this webpage to set Google Accounts API.
The vist https://your_project_id.appspot.com and setting with default admin(password admin).
Add your gmail to Email sender
If you don't add this, you will get error wrong SRC_EMAIL
when diliver the subscription.
- On left dashboard's App Engine – settings – email sender.
- If your gmail is not in this list, click ADD on the right of Settings, then enter your gmail with a TAB to finish your input.
- Finally click ADD. Done!
2 Configuration
Now, read the FAQ to get it works as you wish.
3 Post configuration
- Goto amazon - your content and device - preferences - Personal Document Settings
- Add the gmail to approved email list
- Disable less secure application here.
4 Issues
4.1 gcloud deploy error
1 | ➜ bin ./gcloud app deploy --version=1 /Users/xxx/Downloads/KindleEar-master/app.yaml /Users/xxx/Downloads/KindleEar-master/module-worker.yaml |
Change the google cloud app deploy tool according to current version and notes.
4.2 DONE internal server error
Click to GAE dashboard, Datastore – indexes, check Book, DeliverLog, Feed status. Maybe should update indexes.
1 | appcfg.py update_indexes ./ |
When encountered this error, I decided to reinstall the kindleear in google cloud shell.